﻿using System;
using System.Text;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Data;
using Bangle.DBUtility;
namespace Bangle.DAL
{
    //T_Phone
    public partial class T_SaleDAL
    {

        /// <summary>
        /// 获取销售单号流水号
        /// </summary>
        public string GetMaxSaleCode(string strWhere)
        {
            string strSql = string.Format(" select max(SaleCode) as MaxSaleCode from T_Sale where SaleCode like '{0}'", strWhere);
            DataSet ds = DbHelperSQL.Query(strSql);
            string sResult = "";
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                sResult = ds.Tables[0].Rows[0][0].ToString();
            }
            return sResult;
        }


    }
}

